{literal}
    <script type='text/javascript'>
        $(function() {
            
            $('#marque,#modele,#region,#prix').change(function(){
                var action = $('#moteur1').attr('action');
                    if(action.lastIndexOf('module=') == -1) cleanUrl(returnUrl());
            });
            function returnUrl(){
                var marque = $('#marque option:selected').html();
                var modele = $('#modele option:selected').html();
                var region = $('#region option:selected').html();
                var prix   = $('#prix   option:selected').val();
                var url  = '/recherche';
                url +=  (marque != 'Marque') ? '/' + marque : '';  
                url +=  (modele != 'Modele') ? '/' + modele : '';  
                url +=  (region != 'Region') ? '/' + region : '';  
                url +=  (prix   != '0'     ) ? '/' + prix : '';  
                    return url;
            }
            //nettoyer url
            function cleanUrl(_url){
                var urlClean = $('#cleanUrl').val();
                var urlReturn = 'a';
                $.post(urlClean,{url:_url}, function(result){
                    $('#moteur1').attr('action',result);
                });
            }
        });
    </script>
{/literal}
<ul class="idTabs">
    <li><a title="Acheter" class="a1" href="#idTab1">&nbsp;</a></li>
    <li class="last"><a title="Vendre" class="a2" href="#idTab2">&nbsp;</a></li>
</ul>
<div id="idTab1">
    <form id="moteur1" action="{jurl 'recherche~FoRecherche:index'}" method="post" name="moteur1">
      <input type="hidden" id="urlLoadModele" name="urlLoadModele" value="{jurl 'accueil~FoHome:ajaxGetModelByMarqueId', array(), false}">
      <!--url fonction nettoyage url-->
      <input type="hidden" id="cleanUrl"  value="{jurl 'accueil~FoHome:ajaxCleanUrl', array(), false}">
      <h2>Chercher une voiture</h2>
      <div class="rows">
        <select class="s1" id="marque" name="marque">
          <option value="">Marque</option>
          {foreach $marque as $item}
            <option value="{$item->marque_id}">{$item->marque_libelle}</option>
          {/foreach}
        </select>
        <select class="s2" id="region" name="region">
          <option value="">Region</option>
          {foreach $region as $itemRegion}
            <option value="{$itemRegion->region}">{$itemRegion->region}</option>
          {/foreach}
        </select>
      </div>
      <div class="rows">
        <select class="s1" id="modele" name="modele">
          <option value="">Modele</option>
        </select>
        <select class="s2" id="prix" name="prix">
          <option value="0">Tranche de prix</option>
          <option value="0">0 </option>
			<option value="2000">2 000 </option>
			<option value="4000">4 000 </option>
			<option value="6000">6 000 </option>
			<option value="8000">8 000 </option>
			<option value="10000">10 000 </option>
			<option value="12000">12 000 </option>
			<option value="14000">14 000 </option>
			<option value="16000">16 000 </option>
			<option value="18000">18 000 </option>
			<option value="20000">20 000 </option>
			<option value="22000">22 000 </option>
			<option value="24000">24 000 </option>
			<option value="24001">+ 24 000 </option>
        </select>
      </div>
      {literal}
      	<script langage="Jscript"> 
 
var elementTxt; 
var estAffiche; 
setInterval("Clignoter()", 1000); 
 
function Init() 
{ 
   elementTxt = document.getElementById("txtClignotant"); 
   estAffiche = true; 
} 
 
function Clignoter() 
{ 
   if (estAffiche == true) 
   { 
      elementTxt.style.display = "none"; 
      estAffiche = false; 
   } 
   else 
   { 
      elementTxt.style.display = "inline"; 
      estAffiche = true; 
   } 
} 
 
</script> 
      {/literal}
      <div class="rows2"><a class="link1" id="advanced-srch" href="#" title="Recherche avancée"></a><a class="link2" id="srch" href="#" title="Recherche"></a><br />
      	<p id="txtClignotant" style="font:normal 11px Arial, Helvetica, sans-serif; margin:0; padding:0; color:#FFFFFF ;display:none; width:100%; clear:both;" class="errata">Veuillez choisir au moins un critère</p>
      </div>
      
    </form>
</div>
<div id="idTab2" style="display:none">
	{$blocVendre->param_content}
</div>